<?php
header("Content-type: application/json");
require('/opt/php/xhprof/xhprofStart.php');

define('API_VERSION',   2);
define('WEB_SERVER_ROOT_PATH',  '/opt/php/sns/');
require(WEB_SERVER_ROOT_PATH. 'config/config.php');

$uid        =   DOP::request('uid');
$time       =   DOP::request('time');
$hash       =   DOP::request('hash');
$token      =   DOP::request('token');
$action     =   DOP::request('action');

if (empty($uid) || empty($time) || empty($hash) || empty($token) || empty($action))

{
    $result =   'param is A wrong! must need: uid, time, hash, token, action';
    exit ($result);
}

$api    =   new RpcApi($uid, $time);
$result =   $api->callApi($uid, $time, $token, $hash, $action);

# xhprof monitor list
$xhprof =   array(
                2526793 =>  'kisskillkiss',
                2668814 =>  'server',
            );
if (isset($xhprof[HOST_UID]))
{
    require('/opt/php/xhprof/xhprofEnd.php');
}
exit ($result);

